900 |
How can I prevent a link to end to a specified bar
Dim h With Exg2antt1 .BeginUpdate() .Columns.Add("Tasks") With .Chart .AllowLinkBars = True .LevelCount = 2 .set_PaneWidth(False,160) .FirstVisibleDate = #6/20/2005# End With With .Items h = .AddItem("Not-End-Linkable") .AddBar(h,"Unknown",#6/21/2005#,#6/28/2005#) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanEndLink,False) .AddBar(.AddItem("Task 1"),"Task",#6/23/2005#,#6/27/2005#,"") .AddBar(.AddItem("Task 2"),"Task",#6/23/2005#,#6/27/2005#,"") End With .EndUpdate() End With |
899 |
How can I prevent a link to start from a specified bar
Dim h With Exg2antt1 .BeginUpdate() .Columns.Add("Tasks") With .Chart .AllowLinkBars = True .LevelCount = 2 .set_PaneWidth(False,160) .FirstVisibleDate = #6/20/2005# End With With .Items h = .AddItem("Not-Start-Linkable") .AddBar(h,"Unknown",#6/21/2005#,#6/28/2005#) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanStartLink,False) .AddBar(.AddItem("Task 1"),"Task",#6/23/2005#,#6/27/2005#,"") .AddBar(.AddItem("Task 2"),"Task",#6/23/2005#,#6/27/2005#,"") End With .EndUpdate() End With |
898 |
How can I prevent a specified bar to be linked
Dim h With Exg2antt1 .BeginUpdate() .Columns.Add("Tasks") With .Chart .AllowLinkBars = True .LevelCount = 2 .set_PaneWidth(False,160) .FirstVisibleDate = #6/20/2005# End With With .Items h = .AddItem("Not-Linkable") .AddBar(h,"Unknown",#6/21/2005#,#6/28/2005#) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanBeLinked,False) .AddBar(.AddItem("Task 1"),"Task",#6/23/2005#,#6/27/2005#,"") .AddBar(.AddItem("Task 2"),"Task",#6/23/2005#,#6/27/2005#,"") End With .EndUpdate() End With |
897 |
How can I display in the chart's header only days where the week starts
With Exg2antt1 With .Chart .set_PaneWidth(False,0) .FirstVisibleDate = #1/31/2009# .LevelCount = 2 .FirstWeekDay = exontrol.EXG2ANTTLib.WeekDayEnum.exMonday With .get_Level(0) .Label = "<%mmmm%> <%yyyy%>" .Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment .Unit = exontrol.EXG2ANTTLib.UnitEnum.exMonth End With With .get_Level(1) .Unit = exontrol.EXG2ANTTLib.UnitEnum.exDay .FormatLabel = " (0:=weekday(dvalue)) = 1 ? '<b>' +value : '' " End With .UnitWidth = 23 End With End With |
896 |
Is there any automatically way to display and change the bar's duration in the columns section
With Exg2antt1 .BeginUpdate() .MarkSearchColumn = False With .Columns .Add("Tasks") With .Add("Duration") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,513) .Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.SpinType End With End With With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2009# End With With .Items .AllowCellValueToItemBar = True .AddBar(.AddItem("Task 1"),"Task",#1/2/2009#,#1/7/2009#) .AddBar(.AddItem("Task 2"),"Task",#1/4/2009#,#1/9/2009#) End With .EndUpdate() End With |
895 |
How can I programatically move or resize a bar using spin or slider controls in the columns
With Exg2antt1 .BeginUpdate() .MarkSearchColumn = False With .Columns .Add("Tasks") With .Add("Start") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1) .Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.SpinType End With With .Add("End") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2) .Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.SpinType End With End With With .Chart .LevelCount = 2 .ShowEmptyBars = 1 .FirstVisibleDate = #1/1/2009# End With With .Items .AllowCellValueToItemBar = True .AddBar(.AddItem("Task 1"),"Task",#1/2/2009#,#1/7/2009#) .AddBar(.AddItem("Task 2"),"Task",#1/4/2009#,#1/9/2009#) End With .EndUpdate() End With |
894 |
I am trying to call the ItemBar(exBarStart) after curent ending point, and the bar is not updated. What I am doing wrong
Dim h With Exg2antt1 .BeginUpdate() .Columns.Add("Tasks") With .Chart .set_PaneWidth(False,64) .FirstVisibleDate = #6/21/2005# .ShowEmptyBars = 1 End With With .Items h = .AddItem("Test") .AddBar(h,"Task",#6/22/2005#,#6/26/2005#,"") .AddBar(h,"Task",#6/27/2005#,.get_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarEnd)) End With .EndUpdate() End With |
893 |
How can change in the same time the starting and ending points of the bar
Dim h With Exg2antt1 .BeginUpdate() .Columns.Add("Tasks") With .Chart .set_PaneWidth(False,64) .FirstVisibleDate = #6/21/2005# .ShowEmptyBars = 1 End With With .Items h = .AddItem("Test") .AddBar(h,"Task",#6/22/2005#,#6/26/2005#) End With With .Items h = .FirstVisibleItem .AddBar(h,"Task",#6/27/2005#,#6/29/2005#) End With .EndUpdate() End With |
892 |
How can I control the exBarEffort property of the bar using slider controls
Dim h,h1 With Exg2antt1 .BeginUpdate() .MarkSearchColumn = False .ShowFocusRect = False .OnResizeControl = exontrol.EXG2ANTTLib.OnResizeControlEnum.exResizeChart .Columns.Add("Tasks").AllowDragging = False With .Columns.Add("Histogram") .AllowDragging = False .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .PartialCheck = True .AllowSizing = False .Width = 18 .LevelKey = 1 End With .Items.AllowCellValueToItemBar = True With .Columns.Add("Effort") .LevelKey = 1 .AllowDragging = False .AllowSizing = False .Width = 64 .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,21) With .Editor .EditType = exontrol.EXG2ANTTLib.EditTypeEnum.SliderType .set_Option(exontrol.EXG2ANTTLib.EditorOptionEnum.exSliderWidth,-100) .set_Option(exontrol.EXG2ANTTLib.EditorOptionEnum.exSliderMax,9) .set_Option(exontrol.EXG2ANTTLib.EditorOptionEnum.exSliderMin,1) End With End With With .Chart .LevelCount = 3 .NonworkingDays = 0 .set_PaneWidth(False,160) .FirstVisibleDate = #6/20/2005# .HistogramVisible = True .HistogramView = &H10000 Or exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping Or exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramRecLeafItems Or exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems Or exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems Or exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems .HistogramHeight = 64 With .Bars.Item("Task") .HistogramCriticalColor = Color.FromArgb(255,0,0) .HistogramPattern = exontrol.EXG2ANTTLib.PatternEnum.exBezierCurve .HistogramType = exontrol.EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation End With End With With .Items h = .AddItem("Project 1") .AddBar(h,"Summary",#6/21/2005#,#7/1/2005#) .set_CellEditorVisible(h,2,exontrol.EXG2ANTTLib.EditorVisibleEnum.exEditorHidden) .set_CellValue(h,2,"") h1 = .InsertItem(h,Nothing,"Task 1") .AddBar(h1,"Task",#6/21/2005#,#6/28/2005#) .set_CellMerge(h1,0,1) .DefineSummaryBars(h,"",h1,"") h1 = .InsertItem(h,Nothing,"Task 2") .AddBar(h1,"Task",#6/23/2005#,#7/1/2005#,"") .set_CellMerge(h1,0,1) .DefineSummaryBars(h,"",h1,"") .set_ItemBar(h1,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort,5) h1 = .InsertItem(h,Nothing,"Task 3") .AddBar(h1,"Task",#6/25/2005#,#6/27/2005#,"") .set_CellMerge(h1,0,1) .DefineSummaryBars(h,"",h1,"") .set_ExpandItem(h,True) .set_CellState(h,1,1) h = .AddItem("Project 2") .AddBar(h,"Summary",#3/7/2005#,#7/12/2005#) .set_CellEditorVisible(h,2,exontrol.EXG2ANTTLib.EditorVisibleEnum.exEditorHidden) .set_CellValue(h,2,"") h1 = .InsertItem(h,Nothing,"Task 1") .AddBar(h1,"Task",#7/3/2005#,#7/8/2005#) .set_CellMerge(h1,0,1) .DefineSummaryBars(h,"",h1,"") h1 = .InsertItem(h,Nothing,"Task 2") .AddBar(h1,"Task",#7/5/2005#,#7/12/2005#,"") .set_CellMerge(h1,0,1) .DefineSummaryBars(h,"",h1,"") .set_ItemBar(h1,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort,5) h1 = .InsertItem(h,Nothing,"Task 3") .AddBar(h1,"Task",#7/7/2005#,#7/8/2005#,"") .set_CellMerge(h1,0,1) .DefineSummaryBars(h,"",h1,"") .set_ExpandItem(h,True) .set_CellState(h,1,1) End With .EndUpdate() End With |
891 |
How can I determine if there is any Redo operation
Dim var_CanRedo With Exg2antt1 With .Chart .AllowUndoRedo = True .LevelCount = 2 .FirstVisibleDate = #1/1/2001# End With .Columns.Add("Column") With .Items .AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#) .AddBar(.AddItem("Item 2"),"Task",#1/3/2001#,#1/7/2001#) End With var_CanRedo = .Chart.CanRedo End With |
890 |
How can I determine if there is any Undo operation
Dim var_CanUndo With Exg2antt1 With .Chart .AllowUndoRedo = True .LevelCount = 2 .FirstVisibleDate = #1/1/2001# End With .Columns.Add("Column") With .Items .AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#) .AddBar(.AddItem("Item 2"),"Task",#1/3/2001#,#1/7/2001#) End With var_CanUndo = .Chart.CanUndo End With |
889 |
How can I turn on the Undo/Redo feature
With Exg2antt1 With .Chart .AllowUndoRedo = True .LevelCount = 2 .FirstVisibleDate = #1/1/2001# End With .Columns.Add("Column") With .Items .AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#) .AddBar(.AddItem("Item 2"),"Task",#1/3/2001#,#1/7/2001#) End With End With |
888 |
How can I disable resizing the histogram at runtime
With Exg2antt1 .OnResizeControl = exontrol.EXG2ANTTLib.OnResizeControlEnum.exDisableHistogram With .Chart .FirstVisibleDate = #1/1/2001# .HistogramVisible = True .HistogramHeight = 32 .Bars.Item("Task").HistogramPattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternBDiagonal End With .Columns.Add("Column") With .Items .AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#) .AddBar(.AddItem("Item 2"),"Task",#1/3/2001#,#1/7/2001#) End With End With |
887 |
How can I display automatically the start and end dates of the bars in the columns section
With Exg2antt1 .BeginUpdate() With .Columns .Add("Tasks") With .Add("Start") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1) .Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.DateType End With With .Add("End") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2) .Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.DateType End With End With With .Chart .FirstVisibleDate = #9/20/2006# .AllowLinkBars = True .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exNoCreateBar .LevelCount = 2 .set_PaneWidth(False,196) End With With .Items .AllowCellValueToItemBar = True .AddBar(.AddItem("Task 1"),"Task",#9/21/2006#,#9/24/2006#) .AddBar(.AddItem("Task 2"),"Task",#9/22/2006#,#9/25/2006#) .AddBar(.AddItem("Task 3"),"Task",#9/23/2006#,#9/26/2006#) End With .EndUpdate() End With |
886 |
How can I enable Undo/Redo support
With Exg2antt1 .BeginUpdate() .MarkSearchColumn = False .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exHLines With .Columns .Add("Tasks") With .Add("Start") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1) .Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.DateType .LevelKey = 1 End With With .Add("End") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2) .Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.DateType .LevelKey = 1 End With End With With .Chart .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exHLines .FirstVisibleDate = #9/20/2006# .AllowLinkBars = True .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exNoCreateBar .LevelCount = 2 .set_PaneWidth(False,196) .AllowUndoRedo = True End With With .Items .AllowCellValueToItemBar = True .AddBar(.AddItem("Task 1"),"Task",#9/21/2006#,#9/24/2006#) .AddBar(.AddItem("Task 2"),"Task",#9/22/2006#,#9/25/2006#) .AddBar(.AddItem("Task 3"),"Task",#9/23/2006#,#9/26/2006#) End With .EndUpdate() End With |
885 |
Is there any option to update the bar's properties once the cell's value is changed ( associate the cell with bar )
Dim h1,h2,h3 With Exg2antt1 .BeginUpdate() .Debug = True .MarkSearchColumn = False .Items.AllowCellValueToItemBar = True With .Columns .Add("Tasks") .Add("Start").Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.DateType .Add("End").Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.DateType .Add("Info") End With With .Chart .FirstVisibleDate = #9/20/2006# .AllowLinkBars = False .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exNoCreateBar .LevelCount = 2 .set_PaneWidth(False,224) End With With .Items h1 = .InsertItem(Nothing,Nothing,"Task 1") .AddBar(h1,"Task",#9/21/2006#,#9/23/2006#,"A","Caption") .set_ItemBar(h1,"A",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .get_CellEditor(h1,3).EditType = exontrol.EXG2ANTTLib.EditTypeEnum.EditType .CellValueToItemBar(h1,1,exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarStart,"A") .CellValueToItemBar(h1,2,exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarEnd,"A") .CellValueToItemBar(h1,3,exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"A") h2 = .InsertItem(Nothing,Nothing,"Task 2") .AddBar(h2,"Task",#9/22/2006#,#9/24/2006#,"B") With .get_CellEditor(h2,3) .EditType = exontrol.EXG2ANTTLib.EditTypeEnum.SliderType .set_Option(exontrol.EXG2ANTTLib.EditorOptionEnum.exSliderWidth,-100) End With .CellValueToItemBar(h2,1,exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarStart,"B") .CellValueToItemBar(h2,2,exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarEnd,"B") .CellValueToItemBar(h2,3,exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent,"B") h3 = .InsertItem(Nothing,Nothing,"Task 3") .AddBar(h3,"Task",#9/23/2006#,#9/25/2006#,"C") With .get_CellEditor(h3,3) .EditType = exontrol.EXG2ANTTLib.EditTypeEnum.DropDownType .AddItem(0,"Task") .AddItem(1,"Progress") .AddItem(2,"Project Summary") .AddItem(2,"Summary") End With .CellValueToItemBar(h3,1,exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarStart,"C") .CellValueToItemBar(h3,2,exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarEnd,"C") .CellValueToItemBar(h3,3,exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarName,"C") End With .EndUpdate() End With |
884 |
Is there any option to update the bar's properties once the cell's value is changed ( associate the column/cell with bars )
Dim h,h1,h2,h3 With Exg2antt1 .BeginUpdate() .MarkSearchColumn = False .Indent = 11 .HasLines = exontrol.EXG2ANTTLib.HierarchyLineEnum.exSolidLine .Items.AllowCellValueToItemBar = True With .Columns .Add("Tasks") With .Add("Start") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1) .Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.DateType .LevelKey = 1 End With With .Add("End") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2) .Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.DateType .LevelKey = 1 End With With .Add("Transparency") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,19) With .Editor .EditType = exontrol.EXG2ANTTLib.EditTypeEnum.SliderType .set_Option(exontrol.EXG2ANTTLib.EditorOptionEnum.exSliderWidth,-100) End With End With End With With .Chart .FirstVisibleDate = #9/20/2006# .AllowLinkBars = False .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exNoCreateBar .LevelCount = 2 .set_PaneWidth(False,224) End With With .Items h = .AddItem("Project") .AddBar(h,"Summary",#9/21/2006#,#10/3/2006#) .set_CellEditorVisible(h,1,exontrol.EXG2ANTTLib.EditorVisibleEnum.exEditorHidden) .set_CellEditorVisible(h,2,exontrol.EXG2ANTTLib.EditorVisibleEnum.exEditorHidden) h1 = .InsertItem(h,Nothing,"Task 1") .AddBar(h1,"Task",#9/21/2006#,#9/24/2006#) h2 = .InsertItem(h,Nothing,"Task 2") .AddBar(h2,"Task",#9/24/2006#,#9/28/2006#) h3 = .InsertItem(h,Nothing,"Task 3") .AddBar(h3,"Task",#9/28/2006#,#10/3/2006#) .DefineSummaryBars(h,"",h1,"") .DefineSummaryBars(h,"",h2,"") .DefineSummaryBars(h,"",h3,"") .set_ExpandItem(h,True) .set_ItemBold(h,True) End With .EndUpdate() End With |
883 |
How can I group two bars so I can specify the range or the limit of the interval between them
Dim h,h1,h2,h3 With Exg2antt1 .BeginUpdate() .MarkSearchColumn = False .OnResizeControl = exontrol.EXG2ANTTLib.OnResizeControlEnum.exResizeChart .Columns.Add("Tasks") .Columns.Add("Start").Visible = False .Columns.Add("End").Visible = False With .Chart .FirstVisibleDate = #9/20/2006# .set_PaneWidth(False,64) End With With .Items h = .AddItem("Project") .set_CellValue(h,1,#9/21/2006#) .set_CellValue(h,2,#10/3/2006#) .AddBar(h,"Summary",.get_CellValue(h,1),.get_CellValue(h,2),"sum") h1 = .InsertItem(h,Nothing,"Task 1") .set_CellValue(h1,1,.get_CellValue(h,1)) .set_CellValue(h1,2,#9/24/2006#) .AddBar(h1,"Task",.get_CellValue(h1,1),.get_CellValue(h1,2),"K1") h2 = .InsertItem(h,Nothing,"Task 2") .set_CellValue(h2,1,.get_CellValue(h1,2)) .set_CellValue(h2,2,#9/28/2006#) .AddBar(h2,"Unknown",.get_CellValue(h2,1),.get_CellValue(h2,2),"K2") .AddLink("L1",h1,"K1",h2,"K2") h3 = .InsertItem(h,Nothing,"Task 3") .set_CellValue(h3,1,.get_CellValue(h2,2)) .set_CellValue(h3,2,.get_CellValue(h,2)) .AddBar(h3,"Task",.get_CellValue(h3,1),.get_CellValue(h3,2),"K3") .AddLink("L2",h2,"K2",h3,"K3") .GroupBars(h1,"K1",False,h2,"K2",True,31,"0;4") .GroupBars(h2,"K2",False,h3,"K3",True,31,"0;2") .DefineSummaryBars(h,"sum",h1,"K1") .DefineSummaryBars(h,"sum",h2,"K2") .DefineSummaryBars(h,"sum",h3,"K3") .set_ExpandItem(h,True) .set_ItemBold(h,True) End With .EndUpdate() End With |
882 |
How can I group my bars so I can resize the interval between them but still keep the lengths of them
Dim h,h1,h2,h3 With Exg2antt1 .BeginUpdate() .MarkSearchColumn = False .OnResizeControl = exontrol.EXG2ANTTLib.OnResizeControlEnum.exResizeChart .Columns.Add("Tasks") .Columns.Add("Start").Visible = False .Columns.Add("End").Visible = False With .Chart .FirstVisibleDate = #9/20/2006# .set_PaneWidth(False,64) End With With .Items h = .AddItem("Project") .set_CellValue(h,1,#9/21/2006#) .set_CellValue(h,2,#10/3/2006#) .AddBar(h,"Summary",.get_CellValue(h,1),.get_CellValue(h,2)) h1 = .InsertItem(h,Nothing,"Task 1") .set_CellValue(h1,1,.get_CellValue(h,1)) .set_CellValue(h1,2,#9/24/2006#) .AddBar(h1,"Task",.get_CellValue(h1,1),.get_CellValue(h1,2)) h2 = .InsertItem(h,Nothing,"Task 2") .set_CellValue(h2,1,.get_CellValue(h1,2)) .set_CellValue(h2,2,#9/28/2006#) .AddBar(h2,"Unknown",.get_CellValue(h2,1),.get_CellValue(h2,2)) .AddLink("L1",h1,"",h2,"") h3 = .InsertItem(h,Nothing,"Task 3") .set_CellValue(h3,1,.get_CellValue(h2,2)) .set_CellValue(h3,2,.get_CellValue(h,2)) .AddBar(h3,"Task",.get_CellValue(h3,1),.get_CellValue(h3,2)) .AddLink("L2",h2,"",h3,"") .GroupBars(h1,"",False,h2,"",True,35) .GroupBars(h2,"",False,h3,"",True,35) .DefineSummaryBars(h,"",h1,"") .DefineSummaryBars(h,"",h2,"") .DefineSummaryBars(h,"",h3,"") .set_ExpandItem(h,True) .set_ItemBold(h,True) End With .EndUpdate() End With |
881 |
Can I group my bars so they move together when a bar inside changes, but still preserving the length of the bars
Dim h,h1,h2,h3 With Exg2antt1 .BeginUpdate() .MarkSearchColumn = False .OnResizeControl = exontrol.EXG2ANTTLib.OnResizeControlEnum.exResizeChart .Columns.Add("Tasks") .Columns.Add("Start").Visible = False .Columns.Add("End").Visible = False With .Chart .FirstVisibleDate = #9/20/2006# .set_PaneWidth(False,64) End With With .Items h = .AddItem("Project") .set_CellValue(h,1,#9/21/2006#) .set_CellValue(h,2,#10/3/2006#) .AddBar(h,"Summary",.get_CellValue(h,1),.get_CellValue(h,2)) h1 = .InsertItem(h,Nothing,"Task 1") .set_CellValue(h1,1,.get_CellValue(h,1)) .set_CellValue(h1,2,#9/24/2006#) .AddBar(h1,"Task",.get_CellValue(h1,1),.get_CellValue(h1,2)) h2 = .InsertItem(h,Nothing,"Task 2") .set_CellValue(h2,1,.get_CellValue(h1,2)) .set_CellValue(h2,2,#9/28/2006#) .AddBar(h2,"Unknown",.get_CellValue(h2,1),.get_CellValue(h2,2)) .AddLink("L1",h1,"",h2,"") h3 = .InsertItem(h,Nothing,"Task 3") .set_CellValue(h3,1,.get_CellValue(h2,2)) .set_CellValue(h3,2,.get_CellValue(h,2)) .AddBar(h3,"Task",.get_CellValue(h3,1),.get_CellValue(h3,2)) .AddLink("L2",h2,"",h3,"") .GroupBars(h1,"",False,h2,"",True,3) .GroupBars(h2,"",False,h3,"",True,3) .DefineSummaryBars(h,"",h1,"") .DefineSummaryBars(h,"",h2,"") .DefineSummaryBars(h,"",h3,"") .set_ExpandItem(h,True) .set_ItemBold(h,True) End With .EndUpdate() End With |
880 |
How can I split the time scale, so a section displays days, while other displays weeks, and the other months
Dim h With Exg2antt1 .BeginUpdate() .HeaderHeight = 24 .Columns.Add("Default") With .Chart .DrawDateTicker = True .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exVLines .NonworkingDays = 0 .set_PaneWidth(False,0) .FirstVisibleDate = #1/1/2007# .LevelCount = 3 With .get_Level(0) .Label = "<%yyyy%>" .Unit = exontrol.EXG2ANTTLib.UnitEnum.exYear End With With .get_Level(1) .Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment .Label = "<%hy%>" .Unit = exontrol.EXG2ANTTLib.UnitEnum.exHalfYear .set_ReplaceLabel("1","<b>1/2</b>") .set_ReplaceLabel("2","<b>2/2</b>") End With With .get_Level(2) .Label = "<%mmm%>" .Unit = exontrol.EXG2ANTTLib.UnitEnum.exMonth End With .UnitWidth = 28 .AllowInsideZoom = True With .DefaultInsideZoomFormat .OwnerLabel = "<b><%mmmm%></b> (weeks) " .InsideLabel = "<font ;6>W: <b><%ww%></b>" .InsideUnit = exontrol.EXG2ANTTLib.UnitEnum.exWeek End With With .InsideZooms .SplitBaseLevel = False With .Add(#1/1/2007#) .AllowCustomFormat = True With .CustomFormat .OwnerLabel = "<b><%mmmm%></b> (weeks) " .InsideLabel = "<font ;6>W: <b><%ww%></b>" .InsideUnit = exontrol.EXG2ANTTLib.UnitEnum.exWeek .BackColorChart = Color.FromArgb(187,231,240) End With End With With .Add(#3/1/2007#) .AllowCustomFormat = True .Width = 356 With .CustomFormat .OwnerLabel = "<b><%mmmm%></b> (days) " .InsideLabel = "<font ;5><%d%></font>" .InsideUnit = exontrol.EXG2ANTTLib.UnitEnum.exDay .BackColorChart = Color.FromArgb(145,200,240) End With End With End With End With With .Items h = .AddItem("Task 1 ") .AddBar(h,"Task",#1/12/2007#,#3/9/2007#) h = .AddItem("Task 2") .AddBar(h,"Task",#1/25/2007#,#3/12/2007#) h = .AddItem("Task 3") .AddBar(h,"Task",#2/1/2007#,#2/8/2007#,"B1") .AddBar(h,"Task",#2/8/2007#,#2/15/2007#,"B2") .AddBar(h,"Task",#2/15/2007#,#2/22/2007#,"B3") .AddBar(h,"Task",#2/22/2007#,#2/28/2007#,"B4") End With .EndUpdate() End With |
879 |
How can I define a bar that shows two colors, one up and one down, without using skin or EBN files
Dim h With Exg2antt1 .BeginUpdate() .Columns.Add("Task") .Chart.FirstVisibleDate = #1/1/2001# With .Chart.Bars.Add("A") .Color = Color.FromArgb(255,0,0) .Shape = exontrol.EXG2ANTTLib.ShapeBarEnum.exShapeSolidUp .Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternSolid End With With .Chart.Bars.Add("B") .Color = Color.FromArgb(128,0,0) .Shape = exontrol.EXG2ANTTLib.ShapeBarEnum.exShapeSolidDown .Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternSolid End With .Chart.Bars.Add("A%B").Shortcut = "AB" With .Items h = .AddItem("Task 1") .AddBar(h,"AB",#1/2/2001#,#1/6/2001#,"K1") .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarPercent,1) .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResizePercent,False) End With .EndUpdate() End With |
878 |
Does your control support RightToLeft property for RTL languages or right to left
Dim h With Exg2antt1 .BeginUpdate() .ScrollBars = exontrol.EXG2ANTTLib.ScrollBarsEnum.exDisableBoth .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot With .Columns.Add("P1") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .PartialCheck = True End With With .Items h = .AddItem("Root") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .set_ExpandItem(h,True) End With .RightToLeft = True .EndUpdate() End With |
877 |
Is there any way to display the vertical scroll bar on the left side, as I want to align my data to the right
With Exg2antt1 .BeginUpdate() .ScrollBars = exontrol.EXG2ANTTLib.ScrollBarsEnum.exDisableBoth With .Columns .Add("C1") .Add("C2") .Add("C3") .Add("C4") .Add("C5") .Add("C6") .Add("C7") .Add("C8") End With .RightToLeft = True .EndUpdate() End With |
876 |
Can I display the cell's check box after the text
With Exg2antt1 With .Columns.Add("Column") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellDrawPartsOrder,"caption,check") End With With .Items .set_CellHasCheckBox(.AddItem("Caption 1"),0,True) .set_CellHasCheckBox(.AddItem("Caption 2"),0,True) End With End With |
875 |
Can I change the order of the parts in the cell, as checkbox after the text, and so on
Dim h With Exg2antt1 .Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _ "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _ "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _ "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") .Columns.Add("Column").set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellDrawPartsOrder,"caption,check,icon,icons,picture") With .Items h = .AddItem("Text") .set_CellImage(h,0,1) .set_CellHasCheckBox(h,0,True) End With End With |
874 |
Can I have an image displayed after the text. Can I get that effect without using HTML content
Dim h With Exg2antt1 .Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _ "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _ "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _ "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") .Columns.Add("Column").set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellDrawPartsOrder,"caption,icon,check,icons,picture") With .Items h = .AddItem("Text") .set_CellImage(h,0,1) End With End With |
873 |
My problem is that I want to mark the cells from every second item in the gant with a other backgroundcolor
With Exg2antt1 With .Chart .set_PaneWidth(False,0) .FirstVisibleDate = #1/17/2008# .LevelCount = 2 .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exSecond .get_Level(1).FormatLabel = "(0:=sec(dvalue)) mod 2 ? 0=: : '<bgcolor=00FF00>' + 0=:" End With End With |
872 |
Is there any option to print the columns section on each page
Dim h1,h2 With Exg2antt1 .BeginUpdate() .Columns.Add("Col 1") .Columns.Add("Col 2") .MarkSearchColumn = False .Chart.FirstVisibleDate = #1/1/2001# .Chart.LevelCount = 2 With .Items h1 = .AddItem("Col 1") .set_CellValue(h1,1,"Col 2") .AddBar(h1,"Task",#1/2/2001#,#1/4/2001#,"K1") h2 = .AddItem("Col 1") .set_CellValue(h2,1,"Col 2") .AddBar(h2,"Task",#2/5/2001#,#2/7/2001#,"K2") .AddLink("L1",h1,"K1",h2,"K2") .set_Link("L1",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos,0) End With .EndUpdate() ' Add 'exontrol.exprint.dll(ExPrint.dll)' reference to your project. With New exontrol.EXPRINTLib.exprint() .Options = "ColumnsOnEveryPage=-2" .PrintExt = Exg2antt1 .Preview() End With End With |
871 |
How can I add a different non-working area for different items
Dim h With Exg2antt1 .Columns.Add("Non-Work") With .Chart .FirstWeekDay = exontrol.EXG2ANTTLib.WeekDayEnum.exMonday .FirstVisibleDate = #1/24/2008# .set_PaneWidth(False,52) .LevelCount = 2 End With With .Items h = .AddItem("January") .set_ItemNonworkingUnits(h,False,"month(value) = 1") h = .AddItem("February, Saturday, Sunday") .set_ItemNonworkingUnits(h,False,"month(value) = 2 or (weekday(value) = 0 or weekday(value) = 6)") h = .AddItem("Sunday") .set_ItemNonworkingUnits(h,False,"weekday(value) = 0") End With End With |
870 |
How can I define different non-working units for different items
Dim h,h1 With Exg2antt1 .BeginUpdate() .Columns.Add("Tasks") With .Chart .set_PaneWidth(False,78) .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exCreateBarAuto .FirstVisibleDate = #6/20/2005# .DrawLevelSeparator = exontrol.EXG2ANTTLib.LevelLineEnum.exLevelNoLine .LevelCount = 3 .get_Level(1).DrawGridLines = False .AllowInsideZoom = True .DrawDateTicker = True .DateTickerLabel = "<%mmm%> <%d%><br><b><%hh%>:<%nn%></b>" .MarkSelectDateColor32 = &H7ffff8ee With .DefaultInsideZoomFormat .OwnerLabel = "<%mmm%> <%d%>" .BackColor = Color.FromArgb(238,248,255) .BackColorChart = .BackColor .InsideCount = 4 .InsideLabel = "<b><%hh%></b>" End With .InsideZooms.Add(#6/22/2005#) .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exVLines .Bars.Item("Split").Color = Color.FromArgb(255,0,0) With .Bars.Add("Task:Split") .Color = Color.FromArgb(255,0,0) .Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternBDiagonal .Shortcut = "TaskS" End With End With With .Items h = .AddItem("Project 1") .AddBar(h,"Summary",#6/21/2005#,#7/1/2005#) h1 = .InsertItem(h,Nothing,"Task 1") .AddBar(h1,"TaskS",#6/21/2005#,#6/28/2005#) .set_ItemNonworkingUnits(h1,False,"weekday(value)=1 or weekday(value)=2") .set_ItemNonworkingUnits(h1,True,"weekday(value)=1 or weekday(value)=2 or (hour(value)<8 or hour(value)>=16 )") .DefineSummaryBars(h,"",h1,"") h1 = .InsertItem(h,Nothing,"Task 2") .AddBar(h1,"TaskS",#6/22/2005 4:00:00 AM#,#7/1/2005#,"E") .set_ItemNonworkingUnits(h1,False,"weekday(value)=0") .set_ItemNonworkingUnits(h1,True,"weekday(value)=0 or hour(value)<4 or hour(value)>19") .DefineSummaryBars(h,"",h1,"E") .set_ItemBar(h1,"E",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort,5) h1 = .InsertItem(h,Nothing,"Task 3") .AddBar(h1,"TaskS",#6/22/2005 0:00:00 PM#,#6/27/2005#,"E") .set_ItemNonworkingUnits(h1,False,"weekday(value)=1 or weekday(value)=2") .set_ItemNonworkingUnits(h1,True,"weekday(value)=1 or weekday(value)=2 or (hour(value)<8 or hour(value)>=16 )") .DefineSummaryBars(h,"",h1,"E") .set_ExpandItem(h,True) h = .AddItem("Project 2") .AddBar(h,"Summary",#6/26/2005#,#7/6/2005#) h1 = .InsertItem(h,Nothing,"TaskS 1") .AddBar(h1,"TaskS",#6/26/2005#,#7/2/2005#) .DefineSummaryBars(h,"",h1,"") h1 = .InsertItem(h,Nothing,"TaskS 2") .AddBar(h1,"TaskS",#6/28/2005#,#7/6/2005#,"E") .DefineSummaryBars(h,"",h1,"E") .set_ItemBar(h1,"E",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort,5) h1 = .InsertItem(h,Nothing,"TaskS 3") .AddBar(h1,"TaskS",#6/30/2005#,#7/2/2005#,"E") .DefineSummaryBars(h,"",h1,"E") .set_ExpandItem(h,True) End With .EndUpdate() End With |
869 |
I want to define/highlight for specified dates as being non-working. Is this possible
Dim c,h,p With Exg2antt1 .BeginUpdate() .Columns.Add("Items") With .Chart .NonworkingDaysColor = Color.FromArgb(255,0,0) .set_PaneWidth(False,48) c = .NonworkingDaysColor p = .NonworkingDaysPattern .FirstVisibleDate = #1/1/2001# With .Bars.Add("NW") .Color = c .Pattern = p .Height = -1 .Shape = exontrol.EXG2ANTTLib.ShapeBarEnum.exShapeSolidFrameless End With End With With .Items h = .AddItem("Item 1") .AddBar(h,"NW",#1/2/2001#,#1/3/2001#,"0") .set_ItemBar(h,"0",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarSelectable,False) .AddBar(h,"Task",#1/2/2001#,#1/4/2001#,"K2") h = .AddItem("Item 2") .AddBar(h,"NW",#1/2/2001#,#1/4/2001#,"0") .set_ItemBar(h,"0",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarSelectable,False) .AddBar(h,"Task",#1/2/2001#,#1/5/2001#,"K2") End With .EndUpdate() End With |
868 |
Do you have any sample how can I programmatically magnify a single date, so can show the hours, while the rest of the chart displays days
Dim h,h1 With Exg2antt1 .BeginUpdate() .MarkSearchColumn = False .ShowFocusRect = False .Columns.Add("Tasks") With .Columns.Add("C") .HeaderAlignment = exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .PartialCheck = True .AllowSizing = False .Width = 18 End With With .Chart .set_PaneWidth(False,96) .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exCreateBarAuto .FirstVisibleDate = #6/20/2005# .DrawLevelSeparator = exontrol.EXG2ANTTLib.LevelLineEnum.exLevelNoLine .LevelCount = 3 .get_Level(1).DrawGridLines = False .AllowInsideZoom = True .DrawDateTicker = True .DateTickerLabel = "<%mmm%> <%d%><br><b><%hh%>:<%nn%></b>" .MarkSelectDateColor32 = &H7ffff8ee With .DefaultInsideZoomFormat .OwnerLabel = "<%mmm%> <%d%>" .BackColor = Color.FromArgb(238,248,255) .BackColorChart = .BackColor .InsideCount = 4 .InsideLabel = "<b><%hh%></b>" End With .InsideZooms.Add(#6/22/2005#) .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exVLines End With With .Items h = .AddItem("Project 1") .AddBar(h,"Summary",#6/21/2005#,#7/1/2005#) h1 = .InsertItem(h,Nothing,"Task 1") .AddBar(h1,"Task",#6/21/2005#,#6/28/2005#) .set_CellMerge(h1,0,1) .DefineSummaryBars(h,"",h1,"") h1 = .InsertItem(h,Nothing,"Task 2") .AddBar(h1,"Task",#6/23/2005#,#7/1/2005#,"E") .set_CellMerge(h1,0,1) .DefineSummaryBars(h,"",h1,"E") .set_ItemBar(h1,"E",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort,5) h1 = .InsertItem(h,Nothing,"Task 3") .AddBar(h1,"Task",#6/25/2005#,#6/27/2005#,"E") .set_CellMerge(h1,0,1) .DefineSummaryBars(h,"",h1,"E") .set_ExpandItem(h,True) .set_CellState(h,1,1) h = .AddItem("Project 2") .AddBar(h,"Summary",#6/26/2005#,#7/6/2005#) h1 = .InsertItem(h,Nothing,"Task 1") .AddBar(h1,"Task",#6/26/2005#,#7/2/2005#) .set_CellMerge(h1,0,1) .DefineSummaryBars(h,"",h1,"") h1 = .InsertItem(h,Nothing,"Task 2") .AddBar(h1,"Task",#6/28/2005#,#7/6/2005#,"E") .set_CellMerge(h1,0,1) .DefineSummaryBars(h,"",h1,"E") .set_ItemBar(h1,"E",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort,5) h1 = .InsertItem(h,Nothing,"Task 3") .AddBar(h1,"Task",#6/30/2005#,#7/2/2005#,"E") .set_CellMerge(h1,0,1) .DefineSummaryBars(h,"",h1,"E") .set_ExpandItem(h,True) .set_CellState(h,1,1) End With .EndUpdate() End With |
867 |
How can I define my own/custom labels and subdivisions
With Exg2antt1 .BeginUpdate() With .Chart .ToolTip = "" .set_PaneWidth(False,0) .set_ScrollRange(exontrol.EXG2ANTTLib.ScrollRangeEnum.exStartDate,0) .set_ScrollRange(exontrol.EXG2ANTTLib.ScrollRangeEnum.exEndDate,110) .FirstVisibleDate = 0 .ShowNonworkingDates = False .MarkTodayColor = .BackColor .LevelCount = 3 With .get_Level(0) .ToolTip = "" .Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment .Unit = exontrol.EXG2ANTTLib.UnitEnum.exDay .Count = 16 .FormatLabel = "'Group <b>'+int(1 +dvalue/16)" End With With .get_Level(1) .ToolTip = "" .Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment .Unit = exontrol.EXG2ANTTLib.UnitEnum.exDay .Count = 4 .FormatLabel = " (abs(dvalue)/4) mod 4" .set_ReplaceLabel("0","Sub-Group <b>1</b>") .set_ReplaceLabel("1","Sub-Group <b>2</b>") .set_ReplaceLabel("2","Sub-Group <b>3</b>") .set_ReplaceLabel("3","Sub-Group <b>4</b>") End With With .get_Level(2) .ToolTip = "" .Unit = exontrol.EXG2ANTTLib.UnitEnum.exDay .Count = 1 .FormatLabel = "(abs(dvalue) mod 4)" .set_ReplaceLabel("0","A") .set_ReplaceLabel("1","B") .set_ReplaceLabel("2","C") .set_ReplaceLabel("3","D") End With End With .EndUpdate() End With |
866 |
I want to mark or highlight the last Friday of the month. Is there any option to do that
With Exg2antt1 With .Chart .set_PaneWidth(False,0) .FirstVisibleDate = #1/17/2008# .LevelCount = 2 .get_Level(1).FormatLabel = "(weekday(dvalue)=5 ? month(dvalue+7)!=month(dvalue) ? '<b><bgcolor=000000><fgcolor=FFFFFF>' ) + value" End With End With |
865 |
I use the SelectDate method but the dates are not being highligted. What can I do
With Exg2antt1 .BeginUpdate() With .Chart .FirstVisibleDate = #1/1/2008# .MarkTodayColor = .BackColor .LevelCount = 2 .SelectLevel = 1 .set_SelectDate(#1/2/2008#,True) End With .EndUpdate() End With |
864 |
Can I use ebn files to display the selected dates
With Exg2antt1 .BeginUpdate() With .VisualAppearance .Add(2,"c:\exontrol\images\normal.ebn") .Add(1,"CP:2 0 -4 0 4") End With With .Chart .FirstVisibleDate = #1/1/2008# .MarkTodayColor = .BackColor .LevelCount = 2 .MarkSelectDateColor32 = &H1000000 .SelectLevel = 1 .set_SelectDate(#1/3/2008#,True) .set_SelectDate(#1/4/2008#,True) End With .Columns.Add("Default") With .Items .AddBar(.AddItem("Item 1"),"Task",#1/2/2008#,#1/6/2008#) .AddBar(.AddItem("Item 2"),"Task",#1/3/2008#,#1/7/2008#) .AddBar(.AddItem("Item 3"),"Task",#1/4/2008#,#1/8/2008#) .AddBar(.AddItem("Item 4"),"Task",#1/5/2008#,#1/9/2008#) End With .EndUpdate() End With |
863 |
Can I use ebn files to display the selected dates
With Exg2antt1 .BeginUpdate() .VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn") With .Chart .FirstVisibleDate = #1/1/2008# .MarkTodayColor = .BackColor .LevelCount = 2 .MarkSelectDateColor32 = &H1000000 .SelectLevel = 1 .set_SelectDate(#1/3/2008#,True) End With .Columns.Add("Default") With .Items .AddBar(.AddItem("Item 1"),"Task",#1/2/2008#,#1/6/2008#) .AddBar(.AddItem("Item 2"),"Task",#1/3/2008#,#1/7/2008#) .AddBar(.AddItem("Item 3"),"Task",#1/4/2008#,#1/8/2008#) End With .EndUpdate() End With |
862 |
How can I change the color for selected dates to be solid
With Exg2antt1 .BeginUpdate() With .Chart .set_PaneWidth(False,0) .FirstVisibleDate = #1/1/2008# .MarkTodayColor = .BackColor .LevelCount = 2 .MarkSelectDateColor32 = &H7fff0000 .SelectLevel = 1 .set_SelectDate(#1/15/2008#,True) .set_SelectDate(#1/16/2008#,True) End With .EndUpdate() End With |
861 |
How can I disable selecting dates when I click the chart's header
|
860 |
Is there any option to specify which dates can be magnified or resized
With Exg2antt1 .BeginUpdate() With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2008# .AllowInsideZoom = True .ShowNonworkingDates = True .CondInsideZoom = "not(weekday(value) = 0 or weekday(value) = 6)" End With .EndUpdate() End With |
859 |
How can I change the width for a specified date time unit
With Exg2antt1 .BeginUpdate() With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2008# .AllowInsideZoom = True .AllowResizeInsideZoom = False .InsideZoomOnDblClick = False With .InsideZooms With .Add(#1/4/2008#) .Width = 32 .AllowInsideFormat = False End With End With End With .EndUpdate() End With |
858 |
How can I disable the control's splitter so the user can't resize the list area
With Exg2antt1 .OnResizeControl = exontrol.EXG2ANTTLib.OnResizeControlEnum.exDisableSplitter Or exontrol.EXG2ANTTLib.OnResizeControlEnum.exResizeChart .Chart.set_PaneWidth(False,60) End With |
857 |
How can I disable the control's splitter so the user can't resize the chart area
With Exg2antt1 .OnResizeControl = exontrol.EXG2ANTTLib.OnResizeControlEnum.exDisableSplitter .Chart.set_PaneWidth(True,60) End With |
856 |
How can I change the label for a specified unit
With Exg2antt1 .BeginUpdate() With .Chart .set_PaneWidth(False,0) .LevelCount = 2 .FirstVisibleDate = #1/1/2008# .AllowInsideZoom = True .AllowResizeInsideZoom = False .InsideZoomOnDblClick = False .DefaultInsideZoomFormat.OwnerLabel = "<b><%d%></b> <%d2%>" With .InsideZooms .SplitBaseLevel = False .DefaultWidth = 32 .Add(#1/4/2008#).AllowInsideFormat = False End With End With .EndUpdate() End With |
855 |
How can I bold the inside units
With Exg2antt1 .BeginUpdate() With .Chart .set_PaneWidth(False,0) .LevelCount = 2 .FirstVisibleDate = #1/1/2008# .AllowInsideZoom = True .AllowResizeInsideZoom = False .InsideZoomOnDblClick = False .DefaultInsideZoomFormat.InsideLabel = "<b><%hh%></b>" .InsideZooms.Add(#1/4/2008#) End With .EndUpdate() End With |
854 |
How can I change the scale unit when doing inside zoom ( the chart displays weeks, and we want week days )
With Exg2antt1 .BeginUpdate() With .Chart .ShowNonworkingDates = False .set_PaneWidth(False,0) .LevelCount = 2 With .get_Level(0) .Label = "<%mmmm%>" .Unit = exontrol.EXG2ANTTLib.UnitEnum.exMonth End With With .get_Level(1) .Label = "<%ww%>" .Unit = exontrol.EXG2ANTTLib.UnitEnum.exWeek End With .FirstVisibleDate = #1/1/2008# .AllowInsideZoom = True With .DefaultInsideZoomFormat .OwnerLabel = "<font ;7><%mmm%> Week: <%ww%>" .InsideLabel = "<font ;7><b><%d1%></b>" .InsideUnit = exontrol.EXG2ANTTLib.UnitEnum.exDay End With With .InsideZooms .SplitBaseLevel = False .Add(#2/3/2008#) End With End With .EndUpdate() End With |
853 |
How can I zoom or magnify the selected date to display the hours, from 8 to 8
With Exg2antt1 .BeginUpdate() With .Chart .set_PaneWidth(False,0) .LevelCount = 2 .FirstVisibleDate = #1/1/2008# .AllowInsideZoom = True With .DefaultInsideZoomFormat .InsideLabel = "H: <b><%hh%></b>" .InsideUnit = exontrol.EXG2ANTTLib.UnitEnum.exHour .InsideCount = 8 End With With .InsideZooms .Add(#1/4/2008#) End With End With .EndUpdate() End With |
852 |
How can I zoom or magnify the selected date to display the hours
With Exg2antt1 .BeginUpdate() With .Chart .set_PaneWidth(False,0) .LevelCount = 2 .FirstVisibleDate = #1/1/2008# .AllowInsideZoom = True With .InsideZooms .Add(#1/4/2008#) End With End With .EndUpdate() End With |
851 |
How can I change the foreground color for a time unit
With Exg2antt1 .BeginUpdate() With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2008# .AllowInsideZoom = True .AllowResizeInsideZoom = False .InsideZoomOnDblClick = False .DefaultInsideZoomFormat.ForeColor = Color.FromArgb(255,0,0) With .InsideZooms .SplitBaseLevel = False .DefaultWidth = 18 .Add(#1/4/2008#).AllowInsideFormat = False End With End With .EndUpdate() End With |
850 |
How can I change the background color for a time unit, in the chart area
With Exg2antt1 .BeginUpdate() With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2008# .AllowInsideZoom = True .AllowResizeInsideZoom = False .InsideZoomOnDblClick = False .DefaultInsideZoomFormat.BackColorChart = Color.FromArgb(255,0,0) With .InsideZooms .SplitBaseLevel = False .DefaultWidth = 18 .Add(#1/4/2008#).AllowInsideFormat = False End With End With .EndUpdate() End With |
849 |
How can I change the background color for a time unit, using EBN files
With Exg2antt1 .BeginUpdate() .VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn") With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2008# .AllowInsideZoom = True .AllowResizeInsideZoom = False .InsideZoomOnDblClick = False .DefaultInsideZoomFormat.BackColor32 = &H1000000 With .InsideZooms .SplitBaseLevel = False .DefaultWidth = 18 .Add(#1/4/2008#).AllowInsideFormat = False End With End With .EndUpdate() End With |
848 |
How can I change the background color for a time unit
With Exg2antt1 .BeginUpdate() With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2008# .AllowInsideZoom = True .AllowResizeInsideZoom = False .InsideZoomOnDblClick = False .DefaultInsideZoomFormat.BackColor = Color.FromArgb(255,0,0) With .InsideZooms .SplitBaseLevel = False .DefaultWidth = 18 .Add(#1/4/2008#).AllowInsideFormat = False End With End With .EndUpdate() End With |
847 |
How can I display the column using currency format and enlarge the font for certain values
With Exg2antt1 With .Columns.Add("Currency") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) .FormatColumn = "len(value) ? ((0:=dbl(value)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + currency(=:0)" End With With .Items .AddItem("1.23") .AddItem("2.34") .AddItem("9.94") .AddItem("11.94") .AddItem("1000") End With End With |
846 |
How can I highlight only parts of the cells
Dim h With Exg2antt1 With .Columns.Add("") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) .FormatColumn = "value replace 'hil' with '<fgcolor=FF0000><b>hil</b></fgcolor>'" End With With .Items h = .AddItem("Root") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .InsertItem(h,Nothing,"Child 3") .set_ExpandItem(h,True) End With End With |
845 |
How can I get the number of occurrences of a specified string in the cell
Dim h With Exg2antt1 .Columns.Add("") With .Columns.Add("occurrences") .ComputedField = "lower(%0) count 'o'" .FormatColumn = "'contains ' + value + ' of \'o\' chars'" End With With .Items h = .AddItem("Root") .InsertItem(h,Nothing,"Child 1 oooof the root") .InsertItem(h,Nothing,"Child 2") .InsertItem(h,Nothing,"Child 3") .set_ExpandItem(h,True) End With End With |
844 |
How can I display dates in my format
With Exg2antt1 With .Columns.Add("Date") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) .FormatColumn = "'<b>' + year(0:=date(value)) + '</b><fgcolor=808080><font ;6> (' + month(=:0) + ' - ' + day(=:0) +')'" End With With .Items .AddItem(#1/21/2001#) .AddItem(#2/22/2002#) .AddItem(#3/13/2003#) .AddItem(#4/24/2004#) End With End With |
843 |
How can I display dates in short format
With Exg2antt1 .Columns.Add("Date").FormatColumn = "shortdate(value)" With .Items .AddItem(#1/1/2001#) .AddItem(#2/2/2002#) .AddItem(#3/3/2003#) .AddItem(#4/4/2004#) End With End With |
842 |
How can I display dates in long format
With Exg2antt1 .Columns.Add("Date").FormatColumn = "longdate(value)" With .Items .AddItem(#1/1/2001#) .AddItem(#2/2/2002#) .AddItem(#3/3/2003#) .AddItem(#4/4/2004#) End With End With |
841 |
How can I display only the right part of the cell
Dim h With Exg2antt1 .Columns.Add("") With .Columns.Add("Right") .ComputedField = "%0 right 2" .FormatColumn = "'""' + value + '""'" End With With .Items h = .AddItem("Root") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .InsertItem(h,Nothing,"SChild 3") .set_ExpandItem(h,True) End With End With |
840 |
How can I display only the left part of the cell
Dim h With Exg2antt1 .Columns.Add("") .Columns.Add("Left").ComputedField = "%0 left 2" With .Items h = .AddItem("Root") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .InsertItem(h,Nothing,"SChild 3") .set_ExpandItem(h,True) End With End With |
839 |
How can I display true or false instead 0 and -1
With Exg2antt1 .Columns.Add("Boolean").FormatColumn = "value != 0 ? 'true' : 'false'" With .Items .AddItem(True) .AddItem(False) .AddItem(True) .AddItem(0) .AddItem(1) End With End With |
838 |
Is there any option to print the columns section on each page
Dim h1,h2 With Exg2antt1 .BeginUpdate() .Columns.Add("Task") .Chart.FirstVisibleDate = #1/1/2001# .Chart.LevelCount = 2 With .Items h1 = .AddItem("Task 1") .AddBar(h1,"Task",#1/2/2001#,#1/4/2001#,"K1") h2 = .AddItem("Task 2") .AddBar(h2,"Task",#2/5/2001#,#2/7/2001#,"K2") .AddLink("L1",h1,"K1",h2,"K2") .set_Link("L1",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos,0) End With .EndUpdate() ' Add 'exontrol.exprint.dll(ExPrint.dll)' reference to your project. With New exontrol.EXPRINTLib.exprint() .Options = "ColumnsOnEveryPage=1" .PrintExt = Exg2antt1 .Preview() End With End With |
837 |
How do I print the control's content
Dim h1,h2 With Exg2antt1 .BeginUpdate() .Columns.Add("Task") .Chart.FirstVisibleDate = #1/1/2001# With .Items h1 = .AddItem("Task 1") .AddBar(h1,"Task",#1/2/2001#,#1/4/2001#,"K1") h2 = .AddItem("Task 2") .AddBar(h2,"Task",#1/5/2001#,#1/7/2001#,"K2") .AddLink("L1",h1,"K1",h2,"K2") .set_Link("L1",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos,0) End With .EndUpdate() ' Add 'exontrol.exprint.dll(ExPrint.dll)' reference to your project. With New exontrol.EXPRINTLib.exprint() .PrintExt = Exg2antt1 .Preview() End With End With |
836 |
How can I display icons or images instead numbers
With Exg2antt1 .Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _ "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _ "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _ "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") With .Columns.Add("Icons") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) .FormatColumn = "'The cell displays the icon <img>'+value+'</img> instead ' + value" End With With .Items .AddItem(1) .AddItem(2) .AddItem(3) End With End With |
835 |
How can I display the column using currency
With Exg2antt1 .Columns.Add("Currency").FormatColumn = "currency(dbl(value))" With .Items .AddItem("1.23") .AddItem("2.34") .AddItem("0") .AddItem(5) .AddItem("10000.99") End With End With |
834 |
How can I display the currency only for not empty cells
With Exg2antt1 .Columns.Add("Number") .Columns.Add("Currency").ComputedField = "len(%0) ? currency(dbl(%0)) : ''" With .Items .AddItem("1.23") .AddItem("2.34") .AddItem("0") .set_ItemBackColor(.AddItem(),Color.FromArgb(255,128,128)) .AddItem("10000.99") End With End With |
833 |
Is there a function to display the number of days between two date including the number of hours
Dim h With Exg2antt1 .Columns.Add("Start").Width = 32 .Columns.Add("End") .Columns.Add("Duration").ComputedField = "((1:=int(0:= (date(%1)-date(%0)))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)" & _ "*24))) != 0 ? =:1 + ' hour(s) ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')" With .Items h = .AddItem(#1/11/2001#) .set_CellValue(h,1,#1/14/2001#) h = .AddItem(#2/22/2002 0:00:00 PM#) .set_CellValue(h,1,#3/14/2002 1:00:00 PM#) h = .AddItem(#3/13/2003#) .set_CellValue(h,1,#4/11/2003 11:00:00 AM#) End With End With |
832 |
Is there a function to display the number of days between two date including the number of hours
Dim h With Exg2antt1 .Columns.Add("Start") .Columns.Add("End") .Columns.Add("Duration").ComputedField = """D "" + int(date(%1)-date(%0)) + "" H "" + round(24*(date(%1)-date(%0) - floor(date(%1)-date(%0))))" With .Items h = .AddItem(#1/11/2001#) .set_CellValue(h,1,#1/14/2001 11:00:00 PM#) h = .AddItem(#2/22/2002 0:00:00 PM#) .set_CellValue(h,1,#3/14/2002 1:00:00 PM#) h = .AddItem(#3/13/2003#) .set_CellValue(h,1,#4/11/2003 11:00:00 AM#) End With End With |
831 |
How can I display the number of days between two dates
Dim h With Exg2antt1 .Columns.Add("Start") .Columns.Add("End") .Columns.Add("Duration").ComputedField = "(date(%1)-date(%0)) + ' days'" With .Items h = .AddItem(#1/11/2001#) .set_CellValue(h,1,#1/14/2001#) h = .AddItem(#2/22/2002#) .set_CellValue(h,1,#3/14/2002#) h = .AddItem(#3/13/2003#) .set_CellValue(h,1,#4/11/2003#) End With End With |
830 |
How can I get second part of the date
With Exg2antt1 .Columns.Add("Date") .Columns.Add("Second").ComputedField = "sec(date(%0))" With .Items .AddItem(#1/11/2001 10:10:00 AM#) .AddItem(#2/22/2002 11:01:22 AM#) .AddItem(#3/13/2003 0:23:01 PM#) .AddItem(#4/14/2004 1:11:59 PM#) End With End With |
829 |
How can I get minute part of the date
With Exg2antt1 .Columns.Add("Date") .Columns.Add("Minute").ComputedField = "min(date(%0))" With .Items .AddItem(#1/11/2001 10:10:00 AM#) .AddItem(#2/22/2002 11:01:00 AM#) .AddItem(#3/13/2003 0:23:00 PM#) .AddItem(#4/14/2004 1:11:00 PM#) End With End With |
828 |
How can I check the hour part only so I know it was afternoon
With Exg2antt1 .ConditionalFormats.Add("hour(%0)>=12").Bold = True .Columns.Add("Date") .Columns.Add("Hour").ComputedField = "hour(%0)" With .Items .AddItem(#1/11/2001 10:00:00 AM#) .AddItem(#2/22/2002 11:00:00 AM#) .AddItem(#3/13/2003 0:00:00 PM#) .AddItem(#4/14/2004 1:00:00 PM#) End With End With |
827 |
What about a function to get the day in the week, or days since Sunday
With Exg2antt1 .Columns.Add("Date") .Columns.Add("WeekDay").ComputedField = "weekday(%0)" With .Items .AddItem(#1/11/2001 10:00:00 AM#) .AddItem(#2/22/2002 11:00:00 AM#) .AddItem(#3/13/2003 0:00:00 PM#) .AddItem(#4/14/2004 1:00:00 PM#) End With End With |
826 |
Is there any function to get the day of the year or number of days since January 1st
With Exg2antt1 .Columns.Add("Date") .Columns.Add("Day since January 1st").ComputedField = "yearday(%0)" With .Items .AddItem(#1/11/2001 10:00:00 AM#) .AddItem(#2/22/2002 11:00:00 AM#) .AddItem(#3/13/2003 0:00:00 PM#) .AddItem(#4/14/2004 1:00:00 PM#) End With End With |
825 |
How can I display only the day of the date
With Exg2antt1 .Columns.Add("Date") .Columns.Add("Day").ComputedField = "day(%0)" With .Items .AddItem(#1/11/2001 10:00:00 AM#) .AddItem(#2/22/2002 11:00:00 AM#) .AddItem(#3/13/2003 0:00:00 PM#) .AddItem(#4/14/2004 1:00:00 PM#) End With End With |
824 |
How can I display only the month of the date
With Exg2antt1 .Columns.Add("Date") .Columns.Add("Month").ComputedField = "month(%0)" With .Items .AddItem(#1/1/2001 10:00:00 AM#) .AddItem(#2/2/2002 11:00:00 AM#) .AddItem(#3/3/2003 0:00:00 PM#) .AddItem(#4/4/2004 1:00:00 PM#) End With End With |
823 |
How can I get only the year part from a date expression
With Exg2antt1 .Columns.Add("Date") .Columns.Add("Year").ComputedField = "year(%0)" With .Items .AddItem(#1/1/2001 10:00:00 AM#) .AddItem(#2/2/2002 11:00:00 AM#) .AddItem(#3/3/2003 0:00:00 PM#) .AddItem(#4/4/2004 1:00:00 PM#) End With End With |
822 |
Can I convert the expression to date
With Exg2antt1 .Columns.Add("Number") .Columns.Add("Date").ComputedField = "date(dbl(%0))" With .Items .AddItem("-1.98") .AddItem("30000.99") .AddItem("3561.23") .AddItem("1232.34") End With End With |
821 |
Can I convert the expression to a number, double or float
With Exg2antt1 .Columns.Add("Number") .Columns.Add("Number + 2").ComputedField = "dbl(%0)+2" With .Items .AddItem("-1.98") .AddItem("0.99") .AddItem("1.23") .AddItem("2.34") End With End With |
820 |
How can I display dates in long format
With Exg2antt1 .Columns.Add("Date") .Columns.Add("LongFormat").ComputedField = "longdate(%0)" With .Items .AddItem(#1/1/2001 10:00:00 AM#) .AddItem(#2/2/2002 11:00:00 AM#) .AddItem(#3/3/2003 0:00:00 PM#) .AddItem(#4/4/2004 1:00:00 PM#) End With End With |
819 |
How can I display dates in short format
With Exg2antt1 .Columns.Add("Date") .Columns.Add("ShortFormat").ComputedField = "shortdate(%0)" With .Items .AddItem(#1/1/2001 10:00:00 AM#) .AddItem(#2/2/2002 11:00:00 AM#) .AddItem(#3/3/2003 0:00:00 PM#) .AddItem(#4/4/2004 1:00:00 PM#) End With End With |
818 |
How can I display the time only of a date expression
With Exg2antt1 .Columns.Add("Date") .Columns.Add("Time").ComputedField = "'time is:' + time(date(%0))" With .Items .AddItem(#1/1/2001 10:00:00 AM#) .AddItem(#2/2/2002 11:00:00 AM#) .AddItem(#3/3/2003 0:00:00 PM#) .AddItem(#4/4/2004 1:00:00 PM#) End With End With |
817 |
Is there any function to display currencies, or money formatted as in the control panel
With Exg2antt1 .Columns.Add("Number") .Columns.Add("Currency").ComputedField = "currency(dbl(%0))" With .Items .AddItem(1.23) .AddItem(2.34) .AddItem(10000.99) End With End With |
816 |
How can I convert the expression to a string so I can look into the date string expression for month's name
With Exg2antt1 .Columns.Add("Number") .Columns.Add("Str").ComputedField = "str(%0) + ' AA'" With .Items .AddItem("-1.98") .AddItem("0.99") .AddItem("1.23") .AddItem("2.34") End With End With |
815 |
Can I display the absolute value or positive part of the number
With Exg2antt1 .Columns.Add("Number") .Columns.Add("Abs").ComputedField = "abs(%0)" With .Items .AddItem("-1.98") .AddItem("0.99") .AddItem("1.23") .AddItem("2.34") End With End With |
814 |
Is there any function to get largest number with no fraction part that is not greater than the value
With Exg2antt1 .Columns.Add("Number") .Columns.Add("Floor").ComputedField = "floor(%0)" With .Items .AddItem("-1.98") .AddItem("0.99") .AddItem("1.23") .AddItem("2.34") End With End With |
813 |
Is there any function to round the values base on the .5 value
With Exg2antt1 .Columns.Add("Number") .Columns.Add("Round").ComputedField = "round(%0)" With .Items .AddItem("-1.98") .AddItem("0.99") .AddItem("1.23") .AddItem("2.34") End With End With |
812 |
How can I get or display the integer part of the cell
With Exg2antt1 .Columns.Add("Number") .Columns.Add("Int").ComputedField = "int(%0)" With .Items .AddItem("-1.98") .AddItem("0.99") .AddItem("1.23") .AddItem("2.34") End With End With |
811 |
How can I display names as proper ( first leter of the word must be in uppercase, and the rest in lowercase )
Dim h With Exg2antt1 .Columns.Add("").FormatColumn = "proper(%0)" With .Items h = .AddItem("root") .InsertItem(h,Nothing,"child child") .InsertItem(h,Nothing,"child child") .InsertItem(h,Nothing,"child child") .set_ExpandItem(h,True) End With End With |
810 |
Is there any option to display cells in uppercase
Dim h With Exg2antt1 .Columns.Add("").FormatColumn = "upper(%0)" With .Items h = .AddItem("Root") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .InsertItem(h,Nothing,"Chld 3") .set_ExpandItem(h,True) End With End With |
809 |
Is there any option to display cells in lowercase
Dim h With Exg2antt1 .Columns.Add("").FormatColumn = "lower(%0)" With .Items h = .AddItem("Root") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .InsertItem(h,Nothing,"Chld 3") .set_ExpandItem(h,True) End With End With |
808 |
How can I mark the cells that has a specified type, ie strings only
Dim h With Exg2antt1 .ConditionalFormats.Add("type(%0) = 8").ForeColor = Color.FromArgb(255,0,0) .Columns.Add("") With .Items h = .AddItem("Root") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,2) .InsertItem(h,Nothing,"Chld 3") .set_ExpandItem(h,True) End With End With |
807 |
How can I bold the items that contains data or those who displays empty strings
Dim h,hC With Exg2antt1 .ConditionalFormats.Add("not len(%1)=0").Bold = True .Columns.Add("C1") .Columns.Add("C2") With .Items h = .AddItem("Root") .InsertItem(h,Nothing,"Child 1") hC = .InsertItem(h,Nothing,"Child 2") .set_CellValue(hC,1,"1") .InsertItem(h,Nothing,"Child 3") .set_ExpandItem(h,True) End With End With |
806 |
Can I change the background color for items or cells that contains a specified string
Dim h With Exg2antt1 .ConditionalFormats.Add("%0 contains 'hi'").BackColor = Color.FromArgb(255,0,0) .Columns.Add("") With .Items h = .AddItem("Root") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .InsertItem(h,Nothing,"Chld 3") .set_ExpandItem(h,True) End With End With |
805 |
Is there any option to change the fore color for cells or items that ends with a specified string
Dim h With Exg2antt1 .ConditionalFormats.Add("%0 endwith '22'").ForeColor = Color.FromArgb(255,0,0) .Columns.Add("") With .Items h = .AddItem("Root") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 1.22") .InsertItem(h,Nothing,"Child 2.22") .set_ExpandItem(h,True) End With End With |
804 |
How can I highlight the cells or items that starts with a specified string
Dim h With Exg2antt1 .ConditionalFormats.Add("%0 startwith 'C'").Underline = True .Columns.Add("") With .Items h = .AddItem("Root") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .InsertItem(h,Nothing,"SChild 3") .set_ExpandItem(h,True) End With End With |
803 |
How can I change the background color or the visual appearance using ebn for a particular column
With Exg2antt1 .VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn") With .Columns .Add("Column 1") .Add("Column 2").set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exHeaderBackColor,16777216) .Add("Column 3").set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exHeaderBackColor,16777471) .Add("Column 4") End With End With |
802 |
How can I change the foreground color for a particular column
|
801 |
How can I change the background color for a particular column
|